/*
 *  txdnet.cn tonydon
 * 
 */
package cn.txdnet.txcms.query;

import java.io.Serializable;

/**
 *
 * @author txdnet
 */
abstract public class BaseQuery implements Serializable {

    private static final long serialVersionUID = 1575601785413188757L;
    // 当前总记录数
    protected Integer rownum;
    // 当前排号
    protected Integer crow;
    // 列表显示记录数
    protected Integer listsize;

    /**
     * 过滤参数不符合要求的属性值
     */
    abstract public void filter();

    protected BaseQuery() {
        if (rownum == null || crow == null) {
            rownum = 0;
            crow = 0;
        }
        if (listsize == null) {
            listsize = 20;
        }
    }

    /**
     * @return the rownum
     */
    public Integer getRownum() {
        return rownum;
    }

    /**
     * @param rownum the rownum to set
     */
    public void setRownum(Integer rownum) {
        this.rownum = rownum;
    }

    /**
     * @return the crow
     */
    public Integer getCrow() {
        return crow;
    }

    /**
     * @param crow the crow to set
     */
    public void setCrow(Integer crow) {
        this.crow = crow;
    }

    /**
     * @return the listsize
     */
    public Integer getListsize() {
        return listsize;
    }

    /**
     * @param listsize the listsize to set
     */
    public void setListsize(Integer listsize) {
        this.listsize = listsize;
    }
}
